<?php

namespace App\ModelFilters;


class SysDeptFilter extends BaseFilter
{
    /**
    * Related Models that have ModelFilters as well as the method on the ModelFilter
    * As [relationMethod => [input_key1, input_key2]].
    *
    * @var array
    */
    public $relations = [
    ];

    public function parent_id($parent_id){
        return $this->where('parent_id', $parent_id);
    }
    public function leader($leader){
        return $this->where('leader', $leader);
    }
    public function dept_name($dept_name){
        return $this->where('dept_name', 'LIKE', "%$dept_name%");
    }

    public function status($status){
        return $this->where('status', $status);
    }

    public function exclude_id($exclude_id){
        return $this->whereNotIn('id', explode(',', $exclude_id));
    }

}
